Skip to content

fix: grant guild permissions immediately after creation - #771

Merged
darbyjack merged 1 commit into
masterfrom
fix/initial-guild-permissions
Jul 12, 2026
Merged

fix: grant guild permissions immediately after creation#771
darbyjack merged 1 commit into
masterfrom
fix/initial-guild-permissions

Conversation

@darbyjack

Copy link
Copy Markdown
Member

Summary

Ensure a newly created guild member is added to the member cache before Guilds resolves and applies the guild-tier and role permission nodes.

Root cause

Guild creation called addGuildPerms and addRolePerm before adding the creator to memberCache. Both permission methods look the player's guild up through that cache, so the lookup returned null and the initial permission assignment was skipped until the player rejoined.

Changes

  • add the guild creator to memberCache immediately after the guild is registered
  • apply guild-tier and role permissions only after that cache entry exists
  • leave tier-upgrade behavior unchanged

Validation

  • verified the branch contains one commit and modifies only CommandCreate.kt
  • reviewed the generated diff to confirm this is strictly an ordering change

Fixes #708

@darbyjack
darbyjack marked this pull request as ready for review July 12, 2026 02:19
@darbyjack
darbyjack merged commit 6d26e51 into master Jul 12, 2026
1 check passed
@darbyjack
darbyjack deleted the fix/initial-guild-permissions branch July 12, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permission not adding right after tier upgrade

1 participant